package net.lijingye.education.dao.impl;

import net.lijingye.education.dao.CourseDao;
import net.lijingye.education.entity.Course;
import net.lijingye.education.exception.DaoException;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

/**
 * Created by LijingYe on 2016/4/3.
 */
@Repository
public class CourseDaoImpl extends BaseDaoImpl<Course> implements CourseDao {
    @Override
    public Course getById(Serializable id) throws DaoException {
        Course course = super.getById(id);
        if (null != course && 0 == course.getStatus()) {
            return null;
        }
        return course;
    }
}
